package com.zlp.controller;

import com.zlp.annotaion.SysWebControllerExceptionLog;
import com.zlp.annotaion.SysWebControllerLog;
import com.zlp.constants.SysConsts;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：ZouLiPing
 * @description：AopLog日志拦截测试
 * @date ： 2019/8/14 13:08
 */
@RestController
@Slf4j
public class LogController {

    @SysWebControllerExceptionLog(sysKey=SysConsts.CAR_SOURCE_LIST_KEY,SysTypeName= SysConsts.CAR_SOURCE_MSG,description=SysConsts.CAR_SOURCE_LIST_MSG)
    @SysWebControllerLog(sysKey=SysConsts.CAR_SOURCE_LIST_KEY,SysTypeName= SysConsts.CAR_SOURCE_MSG,description=SysConsts.CAR_SOURCE_LIST_MSG)
    @GetMapping("getLog")
    public String getLog() {

        log.info("test");
        int i = 1/0;
        return "AopLog日志拦截测试";
    }
}
